home *** CD-ROM | disk | FTP | other *** search
/ Komputer for Alle 2001 #11 / CD 11 (Black) - 2001.iso / Fruity / ROLLUPS.DXR / 00004_INIT HANDLERS.ls < prev    next >
Encoding:
Text File  |  1998-04-13  |  2.2 KB  |  88 lines

  1. global gFruitObj, gCompletedRollUp, gRandomPos, gNullCst, gFruitRolledOut, gRolloverSpt, gUnRolledRollUpSpt, gPackageObj, gAnimationInProgress, gFruitInPackageLoc, gGuyObj, gGuyStandingCst, gGuyWalkCst, gGuyDanceCst, gGuyWalking, gInitialColorDepth, gInteruptFlag, gPathDelim, flushActive, gIsPc
  2.  
  3. on startMovie
  4.   set flushActive to 0
  5.   set the mouseDownScript to EMPTY
  6.   set the mouseUpScript to EMPTY
  7.   set the timeoutScript to EMPTY
  8. end
  9.  
  10. on stopMovie
  11.   if not IsShockWave() then
  12.     if the machineType <> 256 then
  13.       if not IsProj() then
  14.         closeXLib(the pathName & "JOHNNY.XOBJ")
  15.       end if
  16.     end if
  17.   end if
  18. end
  19.  
  20. on IsProj
  21.   return 1
  22. end
  23.  
  24. on IsShockWave
  25.   return 0
  26. end
  27.  
  28. on envTest
  29.   if the machineType <> 256 then
  30.     if the soundLevel = 0 then
  31.       alert("The sound level must be set above 0 for Bob and Weave to Box. The sound level is being set to 5.")
  32.       set the soundLevel to 5
  33.     end if
  34.     if IsProj() then
  35.       if the colorDepth <> 8 then
  36.         alert("Your monitor is being set to 8 bit to optimize performance. Your monitor will automatically be set back to " & the colorDepth & " when you quit.")
  37.         set gInitialColorDepth to the colorDepth
  38.         set the colorDepth to 8
  39.       end if
  40.     end if
  41.   end if
  42. end
  43.  
  44. on initGame
  45.   cursor(4)
  46.   initGlobals()
  47.   initObjects()
  48.   if not IsShockWave() then
  49.     if the machineType = 256 then
  50.       set gPathDelim to "\"
  51.       set gIsPc to 1
  52.     else
  53.       set gPathDelim to ":"
  54.       set gIsPc to 0
  55.       if not IsProj() then
  56.         openXLib(the pathName & "JOHNNY.XOBJ")
  57.       end if
  58.     end if
  59.   end if
  60.   resetCursor()
  61. end
  62.  
  63. on initGlobals
  64.   clearGlobals()
  65.   set gInitialColorDepth to 0
  66.   set gInteruptFlag to 0
  67.   set gRandomPos to 0
  68.   set gNullCst to 75
  69.   set gUnRolledRollUpSpt to 19
  70.   set gFruitRolledOut to 0
  71.   set gCompletedRollUp to 0
  72.   set gFruitInPackageLoc to point(39, 150)
  73.   repeat with n = 10 to 12
  74.     set the visible of sprite n to 1
  75.   end repeat
  76. end
  77.  
  78. on initObjects
  79.   global gPackageObj, gGuyObj, gFruitObj
  80.   set gPackageObj to new(script "PACKAGE")
  81.   set gGuyObj to new(script "GUY")
  82.   set gFruitObj to new(script "FRUIT")
  83.   puppetSnd(1, 81)
  84.   slide3(10, 11, 12, 58, 125, 189, 10, 3)
  85.   repeat while soundBusy(1)
  86.   end repeat
  87. end
  88.